package com.jilefojing.session.service;

import com.jilefojing.beans.enums.PlatformEnum;
import com.jilefojing.beans.enums.ThirdPartyTypeEnum;
import com.jilefojing.beans.exception.UserContextException;
import com.jilefojing.beans.pojos.enhanced.EnhancedUserSession;
import com.jilefojing.context.beans.vo.RememberMe;
import com.jilefojing.context.beans.vo.UserContext;

/**
 * @author jgshun
 * @date 2016-4-14 上午9:58:30
 * @version 1.0
 */
public interface ILoginService {

	EnhancedUserSession loginByRemeberMe(RememberMe rememberMe, UserContext userContext) throws UserContextException;

	/**
	 * 密码登录 -->计入redis
	 * 
	 * @param account
	 *            账户/第三方id
	 * 
	 * @param password
	 *            密码
	 * @param isEncoded
	 *            是否加密
	 * @param thirdPartyType
	 *            第三方账户类型 国考账户传null
	 * @param platform
	 *            登录平台
	 * @param deviceId
	 *            设备标识
	 * @param isRM
	 * @param userContext
	 * @throws UserContextException
	 */
	EnhancedUserSession loginWithPassword(String account, String password, boolean isEncoded, ThirdPartyTypeEnum thirdPartyType, PlatformEnum platform, String deviceId, boolean isRM,
			UserContext userContext) throws UserContextException;

	/**
	 * 无须密码登录 -->计入redis
	 * 
	 * @param account
	 *            账户/第三方id
	 * 
	 * @param thirdPartyType
	 *            第三方账户类型 国考账户传null
	 * @param platform
	 *            登录平台
	 * @param deviceId
	 *            设备标识
	 * @param isRM
	 * @throws UserContextException
	 */
	EnhancedUserSession loginWithNoPassword(String account, ThirdPartyTypeEnum thirdPartyType, PlatformEnum platform, String deviceId, boolean isRM, UserContext userContext)
			throws UserContextException;

}
